<template>
  <div>
    <div class="banner" @click="showGallary">
      <img class="banner-img" src="//img1.qunarzz.com/sight/p0/1409/19/adca619faaab0898245dc4ec482b5722.jpg_600x330_f922b488.jpg">
      <div class="banner-info">
        <div class="banner-number">
          <span class="iconfont icon">&#xe67b;</span>
          16
        </div>
        <div class="banner-title">故宫(AAAAA景区)</div>
      </div>
    </div>
    <common-gallary v-show="Gallary"
                    @close="handleGallaryClose">
    </common-gallary>
  </div>
</template>

<script>
import CommonGallary from 'common/gallary/Gallary.vue'
export default {
  name: 'DetailBanner',
  components: {
    CommonGallary
  },
  data () {
    return {
      Gallary: false
    }
  },
  methods: {
    showGallary () {
      this.Gallary = true
    },
    handleGallaryClose () {
      this.Gallary = false
    }
  }
}
</script>

<style lang="stylus">
  .banner
    position: relative
    overflow: hidden
    height: 0
    padding-bottom: 55%
    .banner-img
      width: 100%
    .banner-info
      position: absolute
      left: 0
      right: 0
      bottom: 0
      color: #fff
      line-height: .6rem
      background-image: linear-gradient(to bottom,rgba(0,0,0,0), rgba(0,0,0,0.8))
      .banner-number
        margin-left: .2rem
        padding: 0 .2rem
        width: .8rem
        height: .32rem
        line-height: .32rem
        border-radius: .2rem
        background: rgba(0, 0, 0, .6)
        font-size: .24rem
        .icon
          font-size: .24rem
          padding-right: .1rem
      .banner-title
        font-size: .32rem
        padding: 0 0 .2rem .2rem
</style>
